var t = require;
var e = module;
var o = exports;
var i, n = this && this.__extends || (i = function(t, e) {
    return (i = Object.setPrototypeOf || {
        __proto__: []
    }
    instanceof Array &&
    function(t, e) {
        t.__proto__ = e
    } ||
    function(t, e) {
        for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o])
    })(t, e)
},
function(t, e) {
    function o() {
        this.constructor = t
    }
    i(t, e),
    t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
}),
a = this && this.__decorate ||
function(t, e, o, i) {
    var n, a = arguments.length,
    r = a < 3 ? e: null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
    else for (var s = t.length - 1; s >= 0; s--)(n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
    return a > 3 && r && Object.defineProperty(e, o, r),
    r
};
Object.defineProperty(o, "__esModule", {
    value: !0
});
var r = t("GlobalUserData"),
s = t("Global"),
l = t("BroadCastMessage"),
c = t("SoundManager"),
d = cc._decorator,
h = d.ccclass,
p = d.property,
u = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.btn_click = null,
        e.bgm_game = null,
        e.game_idle = null,
        e.click_gameStart = null,
        e.bgm_gameFight = null,
        e.warnning = null,
        e.rocket_launch = null,
        e.rocket_hit = null,
        e.gatlin_fire = null,
        e.gatlin_hit = null,
        e.spin_loop = null,
        e.car_boom = null,
        e.laser_ready = null,
        e.laser_fire = null,
        e.shotGun = null,
        e.boomerang = null,
        e.result_victory = null,
        e.result_defeat = null,
        e.scene_saw_hit_loop = null,
        e.saw_hit_loop = null,
        e.body_hit1 = null,
        e.fist_hit = null,
        e.thruster = null,
        e.harpoon = null,
        e.win_fireWorks = null,
        e.gameOver_win = null,
        e.gameOver_fail = null,
        e.get_gold = null,
        e.level_up = null,
        e.level_down = null,
        e.audioID_Engine = null,
        e.bPlayedEngine = !1,
        e
    }
    return n(e, t),
    e.prototype.onLoad = function() {
        l.default.getInstance().RemoveMessage(this),
        l.default.getInstance().RegisterMessage(this)
    },
    e.prototype.onDestroy = function() {
        l.default.getInstance().RemoveMessage(this)
    },
    e.prototype.start = function() {
        r.default.gameMode == s.GameMode.Arena && this.playEngineAudio()
    },
    e.prototype.playEngineAudio = function() {
        this.bPlayedEngine || (this.bPlayedEngine = !0, c.default.GetInstance().stopAll(), this.bgm_game && c.default.GetInstance().playMusic(this.bgm_game), this.game_idle && (this.audioID_Engine = c.default.GetInstance().playSound(this.game_idle)))
    },
    e.prototype.stopEngineAudio = function() {
        this.audioID_Engine && c.default.GetInstance().stopAudioByID(this.audioID_Engine)
    },
    e.prototype.load_audio = function() {},
    e.prototype.playAudio = function(t) {
        return c.default.GetInstance().playSound(this[t])
    },
    e.prototype.stopAudio = function(t) {
        c.default.GetInstance().stopAudioByID(t)
    },
    a([p(cc.AudioClip)], e.prototype, "btn_click", void 0),
    a([p(cc.AudioClip)], e.prototype, "bgm_game", void 0),
    a([p(cc.AudioClip)], e.prototype, "game_idle", void 0),
    a([p(cc.AudioClip)], e.prototype, "click_gameStart", void 0),
    a([p(cc.AudioClip)], e.prototype, "bgm_gameFight", void 0),
    a([p(cc.AudioClip)], e.prototype, "warnning", void 0),
    a([p(cc.AudioClip)], e.prototype, "rocket_launch", void 0),
    a([p(cc.AudioClip)], e.prototype, "rocket_hit", void 0),
    a([p(cc.AudioClip)], e.prototype, "gatlin_fire", void 0),
    a([p(cc.AudioClip)], e.prototype, "gatlin_hit", void 0),
    a([p(cc.AudioClip)], e.prototype, "spin_loop", void 0),
    a([p(cc.AudioClip)], e.prototype, "car_boom", void 0),
    a([p(cc.AudioClip)], e.prototype, "laser_ready", void 0),
    a([p(cc.AudioClip)], e.prototype, "laser_fire", void 0),
    a([p(cc.AudioClip)], e.prototype, "shotGun", void 0),
    a([p(cc.AudioClip)], e.prototype, "boomerang", void 0),
    a([p(cc.AudioClip)], e.prototype, "result_victory", void 0),
    a([p(cc.AudioClip)], e.prototype, "result_defeat", void 0),
    a([p(cc.AudioClip)], e.prototype, "scene_saw_hit_loop", void 0),
    a([p(cc.AudioClip)], e.prototype, "saw_hit_loop", void 0),
    a([p(cc.AudioClip)], e.prototype, "body_hit1", void 0),
    a([p(cc.AudioClip)], e.prototype, "fist_hit", void 0),
    a([p(cc.AudioClip)], e.prototype, "thruster", void 0),
    a([p(cc.AudioClip)], e.prototype, "harpoon", void 0),
    a([p(cc.AudioClip)], e.prototype, "win_fireWorks", void 0),
    a([p(cc.AudioClip)], e.prototype, "gameOver_win", void 0),
    a([p(cc.AudioClip)], e.prototype, "gameOver_fail", void 0),
    a([p(cc.AudioClip)], e.prototype, "get_gold", void 0),
    a([p(cc.AudioClip)], e.prototype, "level_up", void 0),
    a([p(cc.AudioClip)], e.prototype, "level_down", void 0),
    a([h], e)
} (cc.Component);
o.default = u